/*
 * <p>Copyright ®Alyce_WX版权所有。</p>
 * 类名:UserRolePO
 * 创建人:alyce_wx
 * 创建时间:2017-03-30
 */
package com.wx.demo.wcd.domain.po;


import com.yjhl.framework.domain.po.PO;
import com.wx.demo.wcd.domain.pk.UserRolePK;

/**
 * persistent class for UserRole 
 * @author alyce_wx
 * @since 1.8
 * @version 1.0.0  
 */
 
public class UserRolePO extends PO {
    private static final long serialVersionUID = 1L;
    
    /**
     * 用户角色关联表标识
     */
    private String userRoleId;
    
    /**
     * 用户标识
     */
    private String userId;
    
    /**
     * 角色表标识
     */
    private String roleId;

    public String getUserRoleId() {
        return userRoleId;
    }

    public void setUserRoleId(String userRoleId) {
        this.userRoleId = userRoleId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }
    
    
	/**
	 * @see com.yjhl.framework.domain.po.PO#isNull()
	 */
	@Override
    public boolean isNull(){
		return (		
    		userRoleId == null     	
    		&&
    		userId == null     	
    		&&
    		roleId == null     	
				);
	}
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#isEmpty()
	 */
	@Override
    public boolean isEmpty(){
		return (		
    	userRoleId == null 
    		&&
    	userId == null 
    		&&
    	roleId == null 
				);
	}
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#isNonPkNull()
	 */
	@Override
    public boolean isNonPkNull(){
		return (		
    		userId == null     	
    		&&
    		roleId == null     	
				);
	}

	/**
	 * @see com.yjhl.framework.domain.po.PO#isNonPkEmpty()
	 */
	@Override
    public boolean isNonPkEmpty(){
		return (		
    	userId == null 
    		&&
    	roleId == null 
				);
	}
	
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#buildPK()
	 */
	@Override
    public UserRolePK buildPK(){
    	UserRolePK entityPK = new UserRolePK();
    	
		entityPK.setUserRoleId( userRoleId );
    	
    	return entityPK;
	}
	
	
	@Override
	public String toString(){
		
		String toString = "{";
		  	 if(this.userRoleId != null){
		   	 	toString += (this.userRoleId+",");
		   	 }
		  	 if(this.userId != null){
		   	 	toString += (this.userId+",");
		   	 }
		  	 if(this.roleId != null){
		   	 	toString += (this.roleId+",");
		   	 }
		  if(toString.lastIndexOf(",") == ( toString.length()-1)){
		  	toString = toString.substring(0, toString.length()-1);
		  }
		 toString += "}";
		return toString;
		
	}
	
	public String inputDescription(){
		
		String inputDescription = "{";
		   if(this.userRoleId != null){
		   		inputDescription += (this.userRoleId+" : 用户角色关联表标识,");
		   }
		   if(this.userId != null){
		   		inputDescription += (this.userId+" : 用户标识,");
		   }
		   if(this.roleId != null){
		   		inputDescription += (this.roleId+" : 角色表标识,");
		   }
		  if(inputDescription.lastIndexOf(",") == ( inputDescription.length()-1)){
		  	inputDescription = inputDescription.substring(0, inputDescription.length()-1);
		  }
		  inputDescription += "}";
		
		return inputDescription;
	}
}
